<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        html {
            font-size: 16px;
        }
        header {
            display: flex;
            flex-direction: column;
            position: relative;
            height: 60px;
            border-bottom: 1px solid #cccccc;
        }
        header p{
            line-height: 60px;
            text-align: center;
        }
        header .icon {
            position: absolute;
            right: 10px;
            top: 20px;
        }
        ul>li {
          list-style: none;
            display: flex;
            height: 50px;
            align-items: center;
            margin: 0 10px;
        }
        ul>li>img {
            margin-left: 10px;
            border-radius: 5px;
        }
        ul>li>section {
            display: flex;
            flex: 1;
            height: 100%;
            margin-left: 10px;
            border-bottom: 1px solid #cccccc;
        }
        ul>li>section>.message {
            display: flex;
            flex: 1;
            flex-direction: column;
            justify-content: center;
        }

         .message .name {
            display: flex;
            font-size: 16px;
            font-weight: bold;
            margin-top: 5px;
        }
         .message .finally,section .date {
            display: flex;
             font-size: 0.75rem;
            margin-top: 5px;
             color: #a1a1a1;
        }

    </style>
</head>
<body>
<header>
<!--    块元素会独占一行-->
    <p>微信(10)</p>
    <div class="icon">
    <img src="../img/search.png" height="20" width="20"/>
    <img src="../img/plus.png" height="20" width="20"/>
    </div>
       <ul>
           <li>
            <img src="../img/head.png" height="40" width="40"/>
               <section>
                   <div class="message" >
                   <div class="name">蜡笔小新</div>
                   <div class="finally">今天妈妈带我去吃冰淇淋</div>
                   </div>
                   <div class="date">
                       <div class="date">18:39</div>
                   </div>
               </section>
           </li>
           <li>
               <img src="../img/head.png" height="40" width="40"/>
               <section>
                   <div class="message" >
                       <div class="name">蜡笔小新</div>
                       <div class="finally">今天妈妈带我去吃冰淇淋</div>
                   </div>
                   <div class="date">
                       <div class="date">18:39</div>
                   </div>
               </section>
           </li>
           <li>
               <img src="../img/head.png" height="40" width="40"/>
               <section>
                   <div class="message" >
                       <div class="name">蜡笔小新</div>
                       <div class="finally">今天妈妈带我去吃冰淇淋</div>
                   </div>
                   <div class="date">
                       <div class="date">18:39</div>
                   </div>
               </section>
           </li>
           <li>
               <img src="../img/head.png" height="40" width="40"/>
               <section>
                   <div class="message" >
                       <div class="name">蜡笔小新</div>
                       <div class="finally">今天妈妈带我去吃冰淇淋</div>
                   </div>
                   <div class="date">
                       <div class="date">18:39</div>
                   </div>
               </section>
           </li>
           </ul>



</header>
</body>
</html>
